<template>
<div class="comment-info" v-if="Object.keys(commentInfo).length !== 0">
  <div class="inofo-header">
    <div class="header-titile">用户评论</div>
    <div class="header-more">
      <span>更多</span>
      <i class="arrow-more">></i>
    </div>
    <div class="info-user">
      <img :src="commentInfo.user.avatar" alt />
      <span>{{commentInfo.user.uname}}</span>
    </div>
    <div class="info-detail">
      <p>{{commentInfo.content}}</p>
      <div class="info-onter">
        <span class="data">{{commentInfo.created }}</span>
        <span>{{commentInfo.style}}</span>
      </div>
      <div class="info-imgs">
        <img :src="item" alt v-for="(item,index) in commentInfo.images" :key="index" />
      </div>
    </div>
  </div>
</div>
</template>

<script>
export default {
  name: 'DetailCommentInfo',
  data() {
    return {}
  },
  props: {
    commentInfo: {
      type: Object,
      default () {
        return {}
      },
    },
  },

  components: {},

  computed: {},

  mounted() {
    console.log(this.commentInfo)
  },
  activated() {
    console.log(this.commentInfo)
  },
  created() {
    console.log(Object.keys(this.commentInfo).length != 0)
  },
  beforeMount() {
    console.log(this.commentInfo.length)
  },
  beforeUpdate() {
    console.log(this.commentInfo)
  },
  destroyed() {
    console.log(Object.keys(this.commentInfo).length != 0)
  },
  methods: {
    getComment() {
      console.log(this.commentInfo)
    },
  },
}
</script>
